package com.ynny.math01;

import java.util.Random;

public class MathUse01 {

    public static void main(String[] args) {
        //获取随机数
        for (int i = 0; i < 10; i++) {
            // 0.0 ~ 0.9
            double random = Math.random() * 10;
            System.out.println(random);
        }
        System.out.println("--------------------");
        //随机数的类
        Random random = new Random();
        for (int i = 0; i < 10; i++) {
            //
            int res = random.nextInt(10);
            System.out.println(res);
        }


    }
}
